package com.sunwayhorizo.health.hl7.persistent.pk;

import java.io.Serializable;

public class RimCoreEntyTelUsesPK implements Serializable {
    public Long entityId;
    public Long entityVersionNum;
    public Long telAddressId;
    public String use;

    public RimCoreEntyTelUsesPK() {
    }

    public RimCoreEntyTelUsesPK(Long entityId, Long entityVersionNum, 
                                Long telAddressId, String use) {
        this.entityId = entityId;
        this.entityVersionNum = entityVersionNum;
        this.telAddressId = telAddressId;
        this.use = use;
    }

    public boolean equals(Object other) {
        if (other instanceof RimCoreEntyTelUsesPK) {
            final RimCoreEntyTelUsesPK otherRimCoreEntyTelUsesPK = (RimCoreEntyTelUsesPK) other;
            final boolean areEqual = 
                (otherRimCoreEntyTelUsesPK.entityId.equals(entityId) && otherRimCoreEntyTelUsesPK.entityVersionNum.equals(entityVersionNum) && otherRimCoreEntyTelUsesPK.telAddressId.equals(telAddressId) && otherRimCoreEntyTelUsesPK.use.equals(use));
            return areEqual;
        }
        return false;
    }

    public int hashCode() {
        return super.hashCode();
    }
}
